import Types from '../actionTypes';

const initState = {
  waitingCount: 0
};

export default (state = initState, action) => {
  let newState = JSON.parse(JSON.stringify(initState));
  switch (action.type) {
    case Types.SOCKET_MSGS:
      if (action.count) {
        newState.waitingCount = action.count;
      }
      return newState;
    default:
      console.log('Types no match in socketMsgs.js ....');
  }
  return state;
}
